package tr.edu.metu.is.mega.client.service;

import java.util.List;

import tr.edu.metu.is.mega.common.dto.UserCoursesViewDTO;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("../GwtUserCoursesViewService")
public interface GwtUserCoursesViewService extends RemoteService {

    /**
     * Utility class for simplifying access to the instance of async service.
     */
    public static class Util {

        private static GwtUserCoursesViewServiceAsync instance;

        public static GwtUserCoursesViewServiceAsync getInstance() {
            if (instance == null) {
                instance = GWT.create(GwtUserCoursesViewService.class);
            }
            return instance;
        }
    }

    public List<UserCoursesViewDTO> getCourses();
}
